from status.models import SystemStart
#from django.utils import timezone

def system_started(request):
    '''Context processor. Returns exact date of system start'''
    
    statuses = SystemStart.objects.all().order_by("-started")
    if statuses is None:
        return {'system_started': None }
    
    status = statuses[0]
    if status.stopped is not None:
        return {'system_started': None }
        
    started = status.started
#   started.replace(tzinfo = timezone.utc)
                        
    return {'system_started': started }
    